import type { InternalAxiosRequestConfig, AxiosRequestConfig, AxiosResponse } from 'axios'

export interface IRequestInterceptors<T = AxiosResponse> {
  requestSuccessFn?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig
  requestFailureFn?: (error: any) => any
  responseSuccessFn?: (response: T) => T
  responseFailureFn?: (error: any) => any
}

export interface IRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: IRequestInterceptors<T>
}
